<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="childrenBody">
	<form class="layui-form" style="width:80%;margin-top: 10px" th:object="${user}">
		<input name="userId"  type="hidden"  th:field="*{userId}" />
		<input name="deptId"  type="hidden"  th:field="*{deptId}" id="treeId"/>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">登录名称</label>
			<div class="layui-input-block">
				<input type="text" name="loginName" class="layui-input loginName" lay-verify="required" placeholder="请输入登录名称" th:field="*{loginName}">
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">用户名称</label>
			<div class="layui-input-block">
				<input type="text" name="userName" class="layui-input userName" lay-verify="required" placeholder="请输入用户名称" th:field="*{userName}">
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">部门名称</label>
			<div class="layui-input-block">
				<input type="text" name="deptName" id="treeName" readonly="readonly" class="layui-input deptName" lay-verify="required" th:field="*{dept.deptName}">
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">邮箱</label>
			<div class="layui-input-block">
				<input type="email" name="email" class="layui-input email" lay-verify="email" placeholder="请输入邮箱" th:field="*{email}">
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">手机</label>
			<div class="layui-input-block">
				<input type="number" name="phonenumber" class="layui-input phonenumber" lay-verify="phone" placeholder="请输入手机"  th:field="*{phonenumber}">
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12" th:with="type=${@dict.getType('sys_user_sex')}">
			<label class="layui-form-label">性别</label>
			<div class="layui-input-block userSex">
				<input th:each="dict : ${type}" type="radio" class="sex" name="sex" th:value="${dict.dictValue}" th:title="${dict.dictLabel}" th:field="*{sex}">
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">角色:</label>
			<div class="layui-input-block">
				<input th:each="role:${roles}" type="checkbox" class="role" name="role" th:title="${role.roleName}" th:checked="${role.flag}" lay-skin="primary" th:value="${role.roleId}">
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit="" lay-filter="editUser">提交</button>
				<button type="button" class="layui-btn  layui-btn-primary close">取消</button>
			</div>
		</div>
	</form>
	<div th:include="include::footer"></div>
	<script th:src="@{/js/user/edituser.js}"></script>
</body>
</html>